<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        .box {
            height: 50px;
            background: rgba(126, 173, 248, 0.97);
            text-align: center;
            line-height: 50px;
        }

        .table-cell {
            width: 600px;
            height: 50px;
            background: rgba(126, 173, 248, 0.97);
            display: table-cell;
            text-align: center;
            vertical-align: middle;
        }
    </style>
</head>
<body>
<div class="box">
    <span>水平垂直居中</span>
</div>
<hr>
<div class="table-cell">
    <div class="cell">水平垂直居中</div>
</div>
</body>
</html>
